package com.xingkeduo.dto.transter.hairstyleSelected;

import com.xingkeduo.dto.HairstyleResponseDTO;
import com.xingkeduo.dto.HairstyleTableDTO;
import com.xingkeduo.util.pojo.domain.Page;
import com.xingkeduo.utils.ResponseUtils;
import lombok.Data;

import java.util.List;

@Data
public class HairstyleSelect {
    private int error;
    private Object reason;
    private ContentHairstyleSelected content;

    public void covert(ResponseUtils<Page<HairstyleTableDTO>> listResponseUtils, ContentHairstyleSelected contentHairstyleSelected) {

        this.error = listResponseUtils.getStatus() == 1 ? 0:1;
        this.reason = listResponseUtils.getMsg() == "success" ? 1:0;
        this.content = contentHairstyleSelected;
    }
}
